Skip to content

feat(atlas-core): gate staging promotion on the mandated embedding model (#7648 M6) - #8337

Merged
dezren39 merged 2 commits into
mainfrom
queue/14268-7648-promotion-model-gate
Nov 10, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/14268-7648-promotion-model-gate

Conversation

@dezren39

@dezren39 dezren39 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Implements contract point M6 of the #6060 decision record for issue #7648 (task 14268): the staging-promotion path now asserts the mandated embedding model.

  • Registry::promote in pkgs/atlas-search/crates/atlas-core/src/stage.rs is the merge-on-close transition to UnitState::Merged, gated by assert_unit_embedding_model: the unit database's recorded atlas_manifest embedding_model must equal the mandated model (crate::shards::EMBEDDING_MODEL_ID, snowflake-arctic-embed-m-v2.0).
  • A unit recording a different model is refused with an error naming the unit and both model ids, and its state does not change. A unit recording no model is refused as unknown provenance — the same refusal shard discovery applies since M1/M2 (atlas: record embedding_model in atlas_manifest and refuse mixed-model fan-out (#6060 M1/M2) #7646) — so a source whose embedding step ran a non-mandated model cannot be promoted silently; the design(atlas): semi-automated ingestion operations — source set, usefulness filter, disk/IO + plan-spend guardrails #6019 ingestion paths inherit the gate by promoting through here.
  • The recording half of M6 already landed with M1/M2: shard manifests are stamped with the producing model (embedding_model key, shards/mod.rs) and the embed pipeline's model is the mandated one by construction (atlas-embed is the snowflake-arctic-embed-m-v2.0 embedder, EMBEDDING_MODEL_ID).
  • set_state is unchanged, so existing staging tests pass unchanged.

Tests (laptop): cargo test -p atlas-core — 44 lib tests pass (including the new stage::tests::promote_asserts_the_mandated_embedding_model, covering mandated-promotes, non-mandated-refused-naming-unit-and-both-ids, and no-model-refused), plus 5 + 14 + 6 integration tests pass.

Closes #7648


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 10, 2026 23:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T23:07:53.544852Z 0b16bab PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit 6e73cfd into main Nov 10, 2026
0 of 10 checks passed
@dezren39
dezren39 deleted the queue/14268-7648-promotion-model-gate branch November 10, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

atlas: embed pipeline and staging promotion assert the mandated embedding model (#6060 M6)

1 participant